package com.xty;

import com.xty.factory.factories.HuaWeiProductFactory;
import com.xty.factory.factories.IProductFactory;
import com.xty.factory.factories.MidProductFactory;


/**
 * Created By IntelliJ IDEA
 *
 * @author 许腾洋
 * @date 2021/11/24
 * description:
 */
public class ProductDemo {
    public static void main(String[] args) {
        //使用专属工厂生产对应品牌的手机
        MidProductFactory midProductFactory = new MidProductFactory();
        midProductFactory.makePhone();
        midProductFactory.makePC();
        IProductFactory iProductFactory = new IProductFactory();
        iProductFactory.makePhone();
        iProductFactory.makePC();
        HuaWeiProductFactory huaWeiProductFactory = new HuaWeiProductFactory();
        huaWeiProductFactory.makePhone();
        huaWeiProductFactory.makePC();
    }
}
